using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Text;

namespace GoodStuff
{
    public class GoodGroupBox : GroupBox
    {
        GoodLayout _layout;

        public GoodGroupBox()
        {
            Margin = new Padding(5, 15, 5, 5);
            _layout = new GoodLayout(this);
            Size = new Size(10, 10);
        }

        public void Add(Control c)
        {
            Add(c, false);
        }

        public void Add(Control c, bool isHorizontal)
        {
            _layout.Add(c, isHorizontal);
            Controls.Add(c);
            PerformLayout();
        }

        public new void PerformLayout()
        {
            _layout.PerformLayout();
            base.PerformLayout();
        }
    }
}
